package cn.healthlink.xmlstudy;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * 简单beanFactory的学习
 * @author dengzhiyuan
 * @version 1.0
 * @time 2020/11/5 20:10
 */
public class BeanFacotryTest {

	public static void main(String[] args) {
		BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("spring-bf.xml"));
		Object a = beanFactory.getBean("componentA");
		Object b = beanFactory.getBean("componentB");
		System.out.println(a);
		System.out.println(b);
	}

}
